home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- SET do#=
- if "%1"=="" echo Type DO ? for HELP
- if "%1"=="" goto END
- if "%1"=="?" goto HELP
- if "%1"=="/w" SET do#=w
- if "%1"=="/w" shift
-
- if "%2"=="" goto 2
- if "%2"=="+" goto 2
- if "%3"=="" goto 3
- if "%3"=="+" goto 3
- if "%4"=="" goto 4
- if "%4"=="+" goto 4
- if "%5"=="" goto 5
- if "%5"=="+" goto 5
- if "%6"=="" goto 6
- if "%6"=="+" goto 6
- if "%7"=="" goto 7
- if "%7"=="+" goto 7
- if "%8"=="" goto 8
- if "%8"=="+" goto 8
- if "%9"=="" goto 9
- if "%9"=="+" goto 9
- goto END
-
- :2
- CALL %1
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :3
- CALL %1 %2
- if %3.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :4
- CALL %1 %2 %3
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :5
- CALL %1 %2 %3 %4
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :6
- CALL %1 %2 %3 %4 %5
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :7
- CALL %1 %2 %3 %4 %5 %6
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :8
- CALL %1 %2 %3 %4 %5 %6 %7
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
- :9
- CALL %1 %2 %3 %4 %5 %6 %7 %8
- if %2.==. goto END
- if "%do#%"=="dow" READY
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- shift
- DO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-
- :HELP
- cls
- echo.╔═════════════════════════════════════════════════════════════════════════╗
- echo ║ DO.BAT - Haris Courouclis (CADMOS), 1990 ║
- echo ╟─────────────────────────────────────────────────────────────────────────╢
- echo ║ FORMAT: DO [/w] command1 [arg1 [arg2 ...] + [command2 ...]] ║
- echo.║ ║
- echo ║ DO is used to execute multiple commands using one command line. ║
- echo ║ The supplied arguments are separated in groups by the plus sign (+). ║
- echo.║ ║
- echo ║ If the first parameter is /w, then READY is executed after each ║
- echo ║ command cycle (Wait). ║
- echo.║ ║
- echo ║ Examples: DO copy c:\do.bat c:\batch\do.bat + del c:\do.bat ║
- echo ║ will execute COPY c:\do.bat c:\batch\do.bat ║
- echo ║ and then DEL c:\do.bat ║
- echo ║ with Wild: Wild /k:list\013 DO ..\*.arj arj e +wild + COMMAND + del *.* ║
- echo ║ will extract files from the parent dir, drop to DOS, use Buerg's LIST ║
- echo ║ to list the files, wait for you to type EXIT, wait for confirmation ║
- echo ║ to delete all files in current dir, and proceed with next ARJ. ║ ║
- echo.║ ║
- echo ║ WARNING: DO.BAT uses (and resets) environmental variable DO# ║
- echo.╚═════════════════════════════════════════════════════════════════════════╝
-
- :END
- SET do#=
- echo.
-